#ifndef CARD_H
#define CARD_H

#include<QVector>
class Card
{
public:
    Card();

    //花色
    enum CardSuit
    {
        suit_Begin,
        Diamond,
        Club,
        Heart,
        Spade,
        Suit_End
    };
    //点数
    enum CardPoint
    {
        Card_Begin,
        Card_3,
        Card_4,
        Card_5,
        Card_6,
        Card_7,
        Card_8,
        Card_9,
        Card_10,
        Card_J,
        Card_Q,
        Card_K,
        Card_A,
        Card_2,
        Card_SJ,//small joker
        Card_BJ,//big joker
        Card_End

    };
    Card(CardPoint point,CardSuit suit);

    CardPoint getPoint() const;
    void setPoint(const CardPoint &value);

    CardSuit getSuti() const;
    void setSuti(const CardSuit &value);

private:
    CardPoint Point;
    CardSuit suti;
};

//对象比较
bool lessSort(const Card&c1,const Card&c2);
bool greateSort(const Card&c1,const Card&c2);
//操作符重载
bool operator==(const Card&left,const Card&right);
bool operator<(const Card&left,const Card&right);
//重写全局函数
uint qHash(const Card&card);

//定义类型别名
using CardList= QVector<Card>;

#endif // CARD_H
